package tech.aistar.service.impl;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Landlord;
import tech.aistar.mapper.LandlordMapper;
import tech.aistar.service.ILandlordService;

import java.util.List;
@Service
public class LandlordServiceImpl implements ILandlordService {
    @Autowired
    private LandlordMapper landlordMapper;

    @Override
    public List<Landlord> selectAll() {
        return landlordMapper.selectAll();
    }

    @Override
    public void insertLandlord(Integer registerId, String identity) {
        landlordMapper.insertLandlord(registerId,identity);
    }


    @Override
    public void insert(Landlord landlord) {
        landlordMapper.insert(landlord);
    }

    @Override
    public void updateByPrimaryKey(Landlord landlord) {
        landlordMapper.updateByPrimaryKey(landlord);
    }

    @Override
    public void deleteByPrimaryKey(Integer id) {
        landlordMapper.deleteByPrimaryKey(id);

    }

    @Override
    public Landlord selectById(Integer id) {
        return landlordMapper.selectById(id);
    }

    @Override
    public int updateById(String phone, Integer id) {
        return landlordMapper.updateById(phone,id);
    }

    @Override
    public int updateNameById(String name, Integer id) {
        return landlordMapper.updateNameById(name,id);
    }

    @Override
    public int updategenderById(String gender, Integer id) {
        return landlordMapper.updategenderById(gender,id);
    }

    @Override
    public Landlord selectByregisterId(Integer registerId) {
        return landlordMapper.selectByregisterId(registerId);
    }
}
